﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset={DT_CHARSET}"/>
<title>{if $seo_title}{$seo_title}{else}{if $head_title}{$head_title}{$DT[seo_delimiter]}{/if}{$DT[sitename]}{/if}</title>
<meta http-equiv="x-ua-compatible" content="IE=7"/>
<link rel="stylesheet" type="text/css" href="{DT_SKIN}style.css"/>
<link rel="stylesheet" type="text/css" href="{DT_SKIN}know.css"/>
<script type="text/javascript" src="{DT_STATIC}lang/{DT_LANG}/lang.js"></script>
<script type="text/javascript" src="{DT_STATIC}file/script/config.js"></script>
<script type="text/javascript" src="{DT_STATIC}file/script/jquery.js"></script>
<script type="text/javascript" src="{DT_STATIC}file/script/common.js"></script>
<script type="text/javascript" src="{DT_STATIC}file/script/page.js"></script>
<script type="text/javascript">
if(parent.location == window.location) Go('{$linkurl}');
</script>
</head>
<body>
<div id="destoon_answer">
{if $action == 'vote_show'}
<div class="m">
<div class="answer_box">
<div class="left_head">Voting Results</div>
<div style="padding:15px;">
<table cellpadding="6" cellspacing="1" width="100%" align="center" bgcolor="#DDDDDD">
<tr bgcolor="#F1F1F1" align="center">
<td>Respondent</td>
<td>Votes</td>
<td width="200">&nbsp;</td>
<td>Proportion</td>
</tr>
{loop $votes $v}
<tr bgcolor="#FFFFFF" align="center">
<td>
{if $v[hidden]}
Anonymous
{else}
	{if $v[username]}
	<a href="{$MOD[linkurl]}{rewrite('search.php?username='.$v['username'])}" class="b" target="_blank" rel="nofollow">{$v[username]}</a>
	{else}
	<span title="{hide_ip($v[ip])}">{ip2area($v[ip])}访客</span>
	{/if}
{/if}
</td>
<td class="px11">{$v[vote]}</td>
<td align="left"><div class="vote_b"><div class="vote_s" style="width:{$v[precent]};"> </div></div></td>
<td class="px11">{$v[precent]}</td>
</tr>
{/loop}
</table>
</div>
<center><input type="button" value="Back" onclick="Go('answer.php?itemid={$itemid}');" class="answer_btn"/></center>
<br/>
</div>
</div>
{else}
<div class="m">
<div class="answer_box">
	<iframe src="" name="send" id="send" style="display:none;"></iframe>
	{if $could_admin && $item[process]==1}
	<div class="left_head">Handling questions</div>
	<div class="question_op">
	<div><span class="px14">If you have received a satisfactory answer, please adopt, thank respondents. If you are not satisfied with the answer, you can try the following： </span></div>	
	{if $items>1}
	<div><a href="answer.php?itemid={$itemid}&action=vote" onclick="return confirm('You sure you want to hold a vote?');" class="f_b px13" target="_top">Voting was held</a><span class="f_gray"> - Do not know which answer is best, so users can vote to select the best answer;</span></div>
	{/if}
	<div><a href="javascript:" onclick="Ds('add_content');H();" class="f_b px13">Supplementary</a><span class="f_gray"> - Supplementary question details to get a more accurate answer;</span></div>
	<div id="add_content" style="display:none;background:#F1F1F1;padding:15px;">
	<form method="post" action="answer.php" target="_top">
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<input type="hidden" name="action" value="addition"/>
	<textarea name="content" id="content" style="width:90%;height:80px;margin:0 0 10px 0;">{$item[addition]}</textarea><br/>
	<input type="submit" value=" Recognized " class="answer_btn"/>
	<input type="button" value=" Cancel " class="answer_btn" onclick="Dh('add_content');H();"/>
	</form>
	</div>
	{if $item[raise] < $MOD[maxraise]}
	<div><a href="javascript:" onclick="Ds('add_credit');H();" class="px13 f_b">Improve the reward</a><span class="f_gray"> - Improve the reward to raise issues of concern;</span></div>
	<div id="add_credit" style="display:none;background:#F1F1F1;padding:15px;">
	<form method="post" action="answer.php" target="_top">
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<input type="hidden" name="action" value="raise"/>
	Question Period, you can append reward <strong class="f_red">{$MOD[maxraise]}</strong> 次(已追加<strong>{$item[raise]}</strong>次)。Reward time, extend the validity of the problem <strong class="f_blue">{$MOD[raisedays]}</strong> Day。<br/> 
	When you are a Reward的{$DT[credit_name]}Than <strong>20</strong> Sharing, the issue will be equivalent to the new issues raised by the problems in the Category list to display the latest。 <br/>
	Additional reward
	<select name="credit">
	{loop $CREDITS $v}
	{if $v>0}<option value="{$v}">{$v}</option>{/if}
	{/loop}
	</select>
	Minute  Current{$DT[credit_name]} <strong class="f_blue">{$_credit}</strong><br/>
	<div style="padding:5px 0 5px 0;">
	<input type="submit" value=" Recognized " class="answer_btn"/>
	<input type="button" value=" Cancel " class="answer_btn" onclick="Dh('add_credit');H();"/>
	</form>
	</div>
	</div>
	{/if}
	<div><a href="answer.php?itemid={$itemid}&action=close" onclick="return confirm('You sure you want to close this issue?');" class="f_b px13" target="_top">Close Problem</a><span class="f_gray"> - No satisfactory answer, you can directly ask questions end, shut down problems;</span></div>
	</div>
	{/if}
</div>
</div>
	<div id="destoon_answers">
	{if $answers}
	{loop $answers $k $v}
	{if $k==count($answers)-1}<a name="last"></a>{/if}
	<div class="m">
		<div class="know_show">
		<table>
		<tr>
		<td valign="top" class="know_show_l">
		<ul>
		{if $v[hidden]}
		<li id="u_{$v[itemid]}"><strong>Anonymous</strong></li>
		<li><img src="{useravatar('', 'large')}" alt=""/></li>
		{else}
		<li id="u_{$v[itemid]}">
			{if $v[username]}
			<a href="{$MOD[linkurl]}{if $v[expert]}{rewrite('expert.php?username='.$v['username'])}{else}{rewrite('search.php?username='.$v['username'])}{/if}" target="_blank" class="b"><strong>{$v[username]}</strong></a>
			{else}
			<strong title="{hide_ip($item[ip])}">{ip2area($item[ip])}Visitors</strong>
			{/if}
		</li>
		<li><img src="{useravatar($v[username], 'large')}" alt=""/></li>
		{if $v[username] && $DT[im_web]}<li>{im_web($v[username], 1)}</li>{/if}
		{/if}
		{if $v[expert]}<li class="f_red">Experts know</li>{/if}
		<li></li>
		</ul>
		</td>
		<td valign="top">
			<div class="know_info">
				<span class="f_r g_gray">
				{if $could_admin && $item[process] == 1}
				<span onclick="choose_answer({$v[itemid]});" class="c_p f_dblue">Adopted as the answer</span>&nbsp;
				{/if}
				{if $item[process] == 2}
					{if $could_admin}
					<span onclick="if(confirm('Sure you want to remove this poll options?')) Dd('send').src='answer.php?itemid={$itemid}&aid={$v[itemid]}&action=vote_del';" class="c_p f_dblue"/>Remove options</span>&nbsp;
					{/if}
					{if !$could_vote || $could_admin}
					<span onclick="Go('answer.php?itemid={$itemid}&action=vote_show');" class="c_p f_dblue"/>Voting Results</span>&nbsp;
					{/if}
					{if $could_vote}
					<span onclick="Dd('send').src='answer.php?itemid={$itemid}&aid={$v[itemid]}&action=vote_add';" class="c_p f_dblue"/>投一票</span>&nbsp;
					{/if}
				{/if}
				</span>
				<span class="px11">{timetodate($v[addtime], 5)}</span>
			</div>
			<div class="content" id="a_{$v[itemid]}">{$v[content]}</div>
		</td>
		</tr>
		</table>
		</div>
	</div>
	{/loop}
	{if $pages}<div class="pages">{$pages}</div>{/if}
	{/if}
	</div>


<div class="m">
<div id="choose_form" style="display:none;">
<div class="answer_box">
	<div class="left_head">Answer</div>
	<div class="answer_body" id="choose_a"></div>
	<div class="answer_foot" id="choose_u"></div>
	<form method="post" action="answer.php" target="_top" onsubmit="return choose_check();">
	<input type="hidden" name="aid" id="aid" value="0"/>
	<input type="hidden" name="action" value="choose"/>
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<table width="100%" cellpadding="8" cellspacing="0">
	<tr>
	<td align="right" valign="top" class="px14"><br/>Thank language or comments：</td>
	<td><textarea rows="6" cols="70" name="thx" id="thx_content" class="f_gray" onfocus="if(this.value=='Say thank you, thanks to the selfless help respondents'){this.value='';this.className='';}">Say thank you, thanks to the selfless help respondents</textarea>
	</td>
	</tr>
	<tr>
	<td align="right"  class="px14">Additional incentives：</td>
	<td>	
	<select name="credit" id="choose_credit">
	<option value="0">0</option>
	{loop $CREDITS $v}
	{if $v>0}<option value="{$v}">{$v}</option>{/if}
	{/loop}
	</select>
	<span class="f_gray">If you are very satisfied with this answer, you can select additional incentive to respondents</span>
	</td>
	</tr>
	<tr>
	<td> </td>
	<td>
	<input type="submit" value=" Recognized " class="answer_btn"/>
	<input type="button" value=" Cancel " class="answer_btn" onclick="choose_cancel();"/>
	</td>
	</tr>
	</table>
	</form>
	</div>
</div>
</div>
	<script type="text/javascript">
	function choose_check() {
		return true;
	}
	function choose_answer(id) {
		Dd('choose_a').innerHTML = Dd('a_'+id).innerHTML;
		Dd('choose_u').innerHTML = Dd('u_'+id).innerHTML;
		Dd('aid').value = id;
		Ds('choose_form');
		H();
		Dd('choose_credit').focus();
	}
	function choose_cancel() {
		Dd('choose_a').innerHTML = '';
		Dd('choose_u').innerHTML = '';
		Dd('aid').value = 0;
		Dh('choose_form');
		H();
	}
	</script>

	{if $could_answer}
<div class="m">
<div class="answer_box">
	<div class="left_head">I have to answer</div>
	<form method="post" action="answer.php" target="send" id="dform" onsubmit="return check();">
	<input type="hidden" name="items" value="{$items}"/>
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<div class="px14">
	<table width="100%" cellpadding="8" cellspacing="1">
	<tr>
	<td align="right" valign="top"><br/>I have to answer：</td>
	<td><textarea name="content" id="content" style="display:none;"></textarea>
	<script type="text/javascript">var ModuleID = {$moduleid};var DTAdmin = 0;var EDPath = "{$MODULE[2][linkurl]}fckeditor/";var EDW = "98%";var FCKID = "content";</script><script type="text/javascript" src="{$MODULE[2][linkurl]}fckeditor/fckeditor.js"></script>	
	<br/><span id="dcontent" class="f_red px12"></span>
	</td>
	</tr>
	<tr>
	<td align="right">Reference material：</td>
	<td><input type="text" name="url" size="60" id="url"/></td>
	</tr>
	{if $_userid}
	<tr>
	<td align="right">Anonymous setting：</td>
	<td class="px12"><input type="checkbox" name="hidden" value="1" id="hidden"/> If you do not show your information, you can set the anonymous answers</td>
	</tr>
	{/if}
	{if $need_question}
	<tr onmouseout="H();">
	<td align="right"><span class="f_red">*</span> Authentication Issues：</td>
	<td class="px12">{template 'question', 'chip'} <span id="danswer" class="f_red"></span></td>
	</tr>
	{/if}
	{if $need_captcha}
	<tr>
	<td align="right"><span class="f_red">*</span> Verification code：</td>
	<td class="px12">{template 'captcha', 'chip'} <span id="dcaptcha" class="f_red"></span></td>
	</tr>
	{/if}
	<tr>
	<td> </td>
	<td class="px12">
	<input type="submit" name="submit" value=" Submit answer " class="answer_btn"/>&nbsp;&nbsp;
	<a href="{$MOD[linkurl]}faq.php#credit" target="_blank" class="b">{$DT[credit_name]}Rule</a>
	</td>
	</tr>
	{if !$_userid}
	<tr>
	<td> </td>
	<td class="px14 f_gray">
	Answer can be obtained after login{$DT[credit_name]}Award, and you can view and manage all the answers。<a href="{$MODULE[2][linkurl]}{$DT[file_login]}" target="_top" class="b">Log in</a> | <a href="{$MODULE[2][linkurl]}{$DT[file_register]}" target="_top" class="b">注册</a><br/>
	</td>
	</tr>
	{/if}
	</table>
	</div>
	</form>
	</div>
</div>
</div>
	{load('clear.js')}
	<script type="text/javascript">
	function check() {
		var l;
		var f;
		f = 'content';
		l = FCKLen();
		if(l < 5) {
			Dmsg('Content should be at least five characters, currently has the input'+l+'Word', f);
			return false;
		}
		{if $need_captcha}
		f = 'captcha';
		l = Dd(f).value;
		if(!is_captcha(l)) {
			Dmsg('Please fill in the correct verification code', f);
			return false;
		}
		if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
			Dd(f).focus();
			return false;
		}
		{/if}
		{if $need_question}
		f = 'answer';
		l = Dd(f).value.length;
		if(l < 1) {
			Dmsg('Please fill out the verification problem', f);
			return false;
		}
		if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
			Dd(f).focus();
			return false;
		}
		{/if}
	}
	try{parent.Dd('answer_btn').style.display = '';}catch(e){}
	</script>
	{/if}
{/if}
<script type="text/javascript">
function H() {
	try{parent.Dd('destoon_answer').style.height = Dd('destoon_answer').scrollHeight+'px';}
	catch(e){}
}
function ImgZoom(i, m) {
	var m = m ? m : 550; var w = i.width;
	if(w < m) return;
	var h = i.height;
	i.title = L['click_open'];
	i.height = parseInt(h*m/w);
	i.width = m;
	i.onclick = function (e) {window.open(EXPath+'view.php?img='+i.src);}
}
function Z() {
	try {
	var content_id = 'destoon_answers';
	var img_max_width = {$MOD[max_width]};
	var Imgs = Dd(content_id).getElementsByTagName("img");
	for(var i=0;i<Imgs.length;i++) {ImgZoom(Imgs[i], img_max_width);}
	var Links = Dd(content_id).getElementsByTagName("a");
	for(var i=0;i<Links.length;i++)	{if(Links[i].target != '_blank') {if(document.domain && Links[i].href.indexOf(document.domain) == -1) Links[i].target = '_blank';}}
	} catch(e) {}
}
window.onload = function() {
{if $could_answer}
var sBasePath = "{$MODULE[2][linkurl]}fckeditor/";var oFCKeditor = new FCKeditor("content");oFCKeditor.Width = "98%";oFCKeditor.Height = "200px";oFCKeditor.BasePath = sBasePath;oFCKeditor.ToolbarSet = "Basic";oFCKeditor.ReplaceTextarea();
{/if}
Z();
H();
}
</script>
{if $could_answer}{load('fckeditor.js')}{/if}
</body>
</html>